home *** CD-ROM | disk | FTP | other *** search
- #!/bin/bash
-
- # include gettext stuff
- . /usr/share/recovery-mode/l10n.sh
-
- # main
- menu_text=$(eval_gettext "Recovery Menu")
-
- while true; do
- unset items
-
- items[c++]="resume"
- items[c++]=$(eval_gettext " Resume normal boot")
-
- for i in /usr/share/recovery-mode/options/*; do
- if [ -x "$i" ]; then
- name="`"$i" test`"
- if [ $? -eq 0 ]; then
- items[c++]="`basename "$i"`"
- items[c++]=" $name"
- fi
- fi
- done
-
- choice="$(/usr/bin/whiptail --menu "$menu_text" 15 70 6 \
- "${items[@]}" \
- 3>&1 1>&2 2>&3 3>&-)"
-
- if [ $? -ne 0 ]; then
- exit
- fi
-
- if [ "$choice" = "resume" ]; then
- exit
- fi
-
- "/usr/share/recovery-mode/options/$choice"
-
- if [ "$?" -eq 42 ]; then
- exit 0
- fi
- done
-